import App from './App'
import '@/utils/date.js'
import store from "./store"
import myMixin from './mixins/mixin.js';
import filters from './utils/filter.js';
import Container from '@/components/Container.vue'
import NoData from '@/components/NoData.vue'
import Tabs from '@/components/Tabs.vue'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
Vue.use(myMixin);
// Vue.component('Container', Container)
// Vue.prototype.$store = store; 这样就可以使用this.$store.state来调用store中的数据了
Object.keys(filters).forEach(key=>{
	  Vue.prototype[key] = filters[key]
  })
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  app.use(store) //新增的一行
  app.use(myMixin)
  app.component('Container', Container)
  app.component('NoData', NoData)
  app.component('Tabs', Tabs)
  // Object.keys(filters).forEach(key=>{
  // 	  console.log(key)
  // 	  app.prototype[key] = filters[key]
  // })
  return {
    app
  }
}
// #endif